package ex.com.jm.food.service.impl;

import java.util.List;

import ex.com.jm.food.dao.AdminCompanyDao;
import ex.com.jm.food.entity.Company;
import ex.com.jm.food.service.AdminCompanyService;

public class AdminCompanyServiceImpl implements AdminCompanyService {

	private AdminCompanyDao adminCompanyDao;

	public AdminCompanyDao getAdminCompanyDao() {
		return adminCompanyDao;
	}

	public void setAdminCompanyDao(AdminCompanyDao adminCompanyDao) {
		this.adminCompanyDao = adminCompanyDao;
	}

	@Override
	public List<Company> getCompanies(int initPage, int pageRow, String name,
			Integer status, String s_date, String e_date, String sort,
			String order) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().getCompanies(initPage, pageRow,
				name, status, s_date, e_date, sort, order);
	}

	@Override
	public int companyCount(String name, Integer status, String s_date,
			String e_date) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().companyCount(name, status, s_date,
				e_date);
	}

	@Override
	public Object saveCompany(Company company) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().saveCompany(company);
	}

	@Override
	public void updateCompany(Company company) {
		// TODO Auto-generated method stub
		this.getAdminCompanyDao().updateCompany(company);
	}

	@Override
	public Company editCompany(String id) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().editCompany(id);
	}

	@Override
	public boolean updateStatus(Integer status, String id) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().updateStatus(status, id);
	}

	@Override
	public boolean updatePower(String power, String id) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().updatePower(power, id);
	}

	@Override
	public Company intoAccount(String id, String name) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().intoAccount(id, name);
	}

	@Override
	public Company checkName(String name) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().checkName(name);
	}

	@Override
	public Company checkEmail(String email) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().checkEmail(email);
	}

	@Override
	public String getPower(String id) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().getPower(id);
	}

	@Override
	public Company checkBankCard(String card) {
		// TODO Auto-generated method stub
		return this.getAdminCompanyDao().checkBankCard(card);
	}

}
